package myErrorParse

import "log"

// o : map[string]value
// demo: printErr(err, getErrs("bytes len", len(bytes)))
func printErr(e error, o interface{}) {

	log.Print("err:", e, ";")

	switch o.(type) {
	case map[string]interface{}:
		for k, v := range o.(map[string]interface{}) {
			log.Print(k, ":", v, ";")
		}
	}
}

func getErrs(k string, v interface{}) map[string]interface{} {
	return map[string]interface{}{k: v}
}
